package com.example.core.hql.utils;

import com.example.core.hql.HQLParameter;

import javax.persistence.Query;
import java.util.List;

public class HQLUtil {

    public static Query setParameters(Query query, List<HQLParameter> parameterList) {
        for (HQLParameter parameter : parameterList) {
            query.setParameter(parameter.getName(),
                    parameter.getValue());
        }
        return query;
    }
}
